package com.jack.cms.config.properties;

//@ConfigurationProperties(prefix = "common.swagger")
public class SwaggerProperties {
	private boolean enabled = false;
	private String pathRegex = "/demo.*";
	private String pathMapping = "/";
	private String basePackage = "com.jack.cms";
	private ApiInfoConfig apiInfo;

	public SwaggerProperties() {
		apiInfo = new ApiInfoConfig();
		apiInfo.setVersion("1.0.0");
		apiInfo.setTitle("Common API");
		apiInfo.setDescription("Keruyun application rest api.");
	}

	public boolean isEnabled() {
		return enabled;
	}

	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}

	public String getPathRegex() {
		return pathRegex;
	}

	public void setPathRegex(String pathRegex) {
		this.pathRegex = pathRegex;
	}

	public String getPathMapping() {
		return pathMapping;
	}

	public void setPathMapping(String pathMapping) {
		this.pathMapping = pathMapping;
	}

	public ApiInfoConfig getApiInfo() {
		return apiInfo;
	}

	public void setApiInfo(ApiInfoConfig apiInfo) {
		this.apiInfo = apiInfo;
	}

	public String getBasePackage() {
		return basePackage;
	}

	public void setBasePackage(String basePackage) {
		this.basePackage = basePackage;
	}

	@Override
	public String toString() {
		return "SwaggerConfigProperties{" + "enabled=" + enabled + ", pathRegex='" + pathRegex + '\''
				+ ", pathMapping='" + pathMapping + '\'' + ", basePackage='" + basePackage + '\'' + ", apiInfo="
				+ apiInfo + '}';
	}

	public static class ApiInfoConfig {
		private String version;
		private String title;
		private String description;

		public String getVersion() {
			return version;
		}

		public void setVersion(String version) {
			this.version = version;
		}

		public String getTitle() {
			return title;
		}

		public void setTitle(String title) {
			this.title = title;
		}

		public String getDescription() {
			return description;
		}

		public void setDescription(String description) {
			this.description = description;
		}

		@Override
		public String toString() {
			return "ApiInfoConfig{" + "version='" + version + '\'' + ", title='" + title + '\'' + ", description='"
					+ description + '\'' + '}';
		}
	}
}
